package com.longshihan.testart.dagger.module;

import com.longshihan.mvplh.dagger.scope.ActivityScope;
import com.longshihan.testart.mvp.contract.TestContract;

import dagger.Module;
import dagger.Provides;

/**
 * @author longshihan
 * @time 2017/8/17 14:59
 * @des 绑定view，初始化persenter的构造函数
 */
@Module
public class UserModule {
    private TestContract.View view;

    /**
     * 构建UserModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     * @param view
     */
    public UserModule(TestContract.View view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    TestContract.View provideUserView(){
        return this.view;
    }

}
